
    <style>
        /* 打开宽度限制 */
        .popover {
            max-width: 90vw;
        }
    </style>
<script language="javascript">
	$(document).ready(function () {

		//设置modal垂直居中,移动
		modalSetting(".modal"); 
		
		$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
			if($(e.target).attr("href")=="#this_area" || $(e.target).attr("href")=="#ready3" ){
				$("#btn_delivery").show();
				$("#btn_print").show();
			}else{
				$("#btn_delivery").hide();
				$("#btn_print").hide();
			}
		})
		
	});
</script>
<div id="main">
	<div class="container-fluid">
		<div class="row clearfix" id="mainalert">
			<div class="col-md-12 column">
				<div class="alert alert-dismissable alert-info">
					<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
					<p></p>
				</div>
			</div>
		</div>

		<div class="ntDesktop">
			{if $isshow==1}
			<div class="ntDesktop-head">配货界面（物流主管）</div>
			{/if}
			<div class="row" style="padding-top:0px">
				<div class="col-md-6">
					<ul class="nav nav-tabs">
						<li class="active" @click="clickGetData('self_fetching')">
							<a href="#self_fetching" data-toggle="tab">
								自取 <span class="label label-info">{{sellfCount ? sellfCount : ''}}</span>
							</a>
						</li>
						<li  @click="clickGetData('this_area')">
							<a href="#this_area" data-toggle="tab">
								待发货（本区） <span class="label label-info">{{areaCount ? areaCount : ''}}</span>
							</a>
						</li>
						<li @click="clickGetData('this_city')">
							<a href="#this_area" data-toggle="tab">
								待发货（本市） <span class="label label-info">{{cityfCount ? cityfCount : ''}}</span>
							</a>
						</li>
						<li @click="clickGetData('logistor')">
							<a href="#logistor" data-toggle="tab">
								物流派送 <span class="label label-info">{{logistorfCount ? logistorfCount : ''}}</span>
							</a>
						</li>
						<li @click="clickGetData('delivery')">
							<a href="#delivery" data-toggle="tab">
								已安排 <span class="label label-default">{{deliveryCount ? deliveryCount : ''}}</span>
							</a>
						</li>
						<li @click="clickGetData('finish')">
							<a href="#finish" data-toggle="tab">
								已完成 <span class="label label-default">{{finishCount ? finishCount : ''}}</span>
							</a>
						</li>
					</ul>
				</div>
				{if $isshow==1}
				<div class="col-md-2">
					<div class="input-group">
						<input type="text" class="form-control" placeholder="输入公司名或订单号" v-model="searchText">
						<div class="input-group-btn">
							<button class="btn btn-primary"  @click="clickCearch()"><span class="fa fa-search"></span> 查找 </button>
						</div>
					</div>
				</div>
				<div class="col-md-1">
					<button class="btn btn-default btn-checkbox" @click="selfWork()">
						<input type="checkbox" class="form-input"> 只显示我的工作
					</button>
				</div>
				<div class="col-md-3 text-right">
					<template v-if="auth_ids.indexOf(339) != -1">
						<button class="btn btn-primary" id="btn_delivery" data-toggle="modal" data-target="#logistor_deliveryModal" @click="batchDelivery('view')" v-if="requestType == 'this_area' || requestType == 'this_city' ">
							<span class="fa fa-dolly"></span>送货安排
						</button>
					</template>
					<button class="btn btn-primary" id="btn_print" data-toggle="modal" data-target="#logistor_deliveryModal" v-if="auth_ids.indexOf(381) != -1">
						<span class="fa fa-print"></span>批量打印送货单
					</button>
					<button class="btn btn-default" data-toggle="modal" data-target="#deliveryman_editModal" @click="deliverymanBtn('view')" v-if="auth_ids.indexOf(335) != -1">
						<span class="fa fa-users"></span>送货人员
					</button>
				</div>
				{/if}
			</div>
			
			<div class="row tab-content">
				<!-- 自取 -->
				<div class="col-md-12 tab-pane active" id="self_fetching">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th width="4%"> 订单号 </th>
								<th width="4%"> 优先 </th>
								<th width="4%"> 时间 </th>
								<th width="20%"> 公司 </th>
								<th> 箱数 </th>
								<th> 体积/重量 </th>
								<th> 位置 </th>
								<th> 装箱单 </th>
								<th> 对货员 </th>
								<th> 操作 </th>
							</tr>
						</thead>
						<tbody>
							<template v-if="list.length > 0">
							<tr v-for="(listItem,listIndex) in list">
								<td>{{formatUnit(listItem.id,'id')}}</td>
								<td align="center"><span class="label label-primary">{{listItem.priority}}</span></td>
								<td class="text-success main-list" :oldTime="listItem.package_at"><b></b></td>
								<td>{{listItem.company_name + (listItem.co_branch_name ? '('+listItem.co_branch_name+')' : '') }}</td>
								<td align="right">
									{{listItem.ctn}}<small class="unit">CTN</small>
								</td>
								<td align="right">
									{{listItem.volume}}<small class="unit">CBM</small><br>
									{{listItem.salePackKgs}}<small class="unit">KGS</small>
								</td>
								<td>{{listItem.salePackArea_name}}</td>
								<td>
									{{listItem.salePackCreate_name}}<br><small>{{listItem.salePackCreate_time}}</small>
								</td>
								<td>
									{{listItem.checker_name}}<br><small>{{listItem.checker_time}}</small>
								</td>
								<td align="right">
									<button class="btn btn-sm btn-default" data-toggle="modal" data-target="#logistor_viewModal" @click="checkView(listItem)">查看</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_takeModal" @click="selfLogistorPickup(listItem,'getDeliveryman')"  :disabled="isdisabled" v-if="auth_ids.indexOf(338) != -1">取货</button>
									<button href="list2logistor_preview.html" class="btn btn-sm btn-default" @click="print()" v-if="auth_ids.indexOf(381) != -1">打印</button>
								</td>
							</tr>
							</template>
							<template v-else>
	                            <tr style="text-align: center;" >
	                                <td colspan="13" class="no_date" style="line-height: 20rem">{:lang('no_data')} </td>
	                            </tr>
	                        </template>
						</tbody>
					</table>
				</div>
			
				<!-- 待发货（本区） -->
				<div class="col-md-12 tab-pane" id="this_area">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th></th>
								<th width="4%"> 订单号 </th>
								<th width="4%"> 优先 </th>
								<th width="4%"> 时间 </th>
								<th width="20%"> 公司 </th>
								<th> 区镇 </th>
								<th> 箱数 </th>
								<th> 体积/重量 </th>
								<th> 位置 </th>
								<th> 装箱单 </th>
								<th> 对货员 </th>
								<th> 操作 </th>
							</tr>
						</thead>
						<tbody>
							<template v-if="list.length > 0">
							<tr v-for="(listItem,listIndex) in list">
								<td><input type="checkbox" :value="listIndex" v-model="listIndexArr"></td>
								<td>{{formatUnit(listItem.id,'id')}}</td>
								<td align="center"><span class="label label-primary">{{listItem.priority}}</span></td>
								<td class="text-success main-list" :oldTime="listItem.package_at"><b></b></td>
								<td>{{listItem.company_name + (listItem.co_branch_name ? '('+listItem.co_branch_name+')' : '') }}</td>
								<td>{{ listItem.co_branch_name ? listItem.co_branch_info.town : listItem.companyInfo.town}}</td>
								<td align="right">
									{{listItem.ctn}}<small class="unit">CTN</small>
								</td>
								<td align="right">
									{{listItem.volume}}<small class="unit">CBM</small><br>
									{{ Math.ceil( (listItem.salePackKgs*100) )/100 }}<small class="unit">KGS</small>
								</td>
								<td>{{listItem.salePackArea_name}}</td>
								<td>
									{{listItem.salePackCreate_name}}<br><small>{{listItem.salePackCreate_time}}</small>
								</td>
								<td>
									{{listItem.checker_name}}<br><small>{{listItem.checker_time}}</small>
								</td>
								<td align="right">
									<button class="btn btn-sm btn-default" data-toggle="modal" data-target="#logistor_viewModal" @click="checkView(listItem)">查看</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_deliveryModal" @click="thisAreaDelivery(listItem,'view')" v-if="auth_ids.indexOf(340) != -1">送货</button>
									<a href="list2logistor_preview.html" class="btn btn-sm btn-default" @click="print()" v-if="auth_ids.indexOf(381) != -1">打印</a>
								</td>
							</tr>
							</template>
							<template v-else>
	                            <tr style="text-align: center;" >
	                                <td colspan="13" class="no_date" style="line-height: 20rem">{:lang('no_data')} </td>
	                            </tr>
	                        </template>
						</tbody>
					</table>
				</div>

				<!-- 物流派送 -->
				<div class="col-md-12 tab-pane" id="logistor">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th width="4%"> 订单号 </th>
								<th width="4%"> 优先 </th>
								<th width="4%"> 时间 </th>
								<th width="20%"> 公司 </th>
								<th> 省/市 </th>
								<th> 箱数 </th>
								<th> 体积/重量 </th>
								<th> 位置 </th>
								<th> 送货方式 </th>
								<th> 装箱单 </th>
								<th> 对货员 </th>
								<th> 操作 </th>
							</tr>
						</thead>
						<tbody>
							<template v-if="list.length > 0">
							<tr v-for="(listItem,listIndex) in list">
								<td>{{formatUnit(listItem.id,'id')}}</td>
								<td align="center"><span class="label label-primary">{{listItem.priority}}</span></td>
								<td class="text-success main-list" :oldTime="listItem.package_at"><b></b></td>
								<td>{{listItem.company_name + (listItem.co_branch_name ? '('+listItem.co_branch_name+')' : '') }}</td>

								<td>
									<template v-if="listItem.co_branch_name">
										<span v-if="listItem.province">
											{{ listItem.companyInfo.province  + (listItem.companyInfo.city ? ' / ' + listItem.companyInfo.city : '') }}
										</span>
										<span v-if="listItem.city">{{ (listItem.companyInfo.province ? listItem.companyInfo.province + ' / ' : '' ) + listItem.companyInfo.city }}</span>
									</template>
									<template v-else>
										<span v-if="listItem.province">
											{{ listItem.co_branch_info.province  + (listItem.co_branch_info.city ? ' / ' + listItem.co_branch_info.city : '') }}
										</span>
										<span v-if="listItem.city">{{ (listItem.co_branch_info.province ? listItem.co_branch_info.province + ' / ' : '' ) + listItem.co_branch_info.city }}</span>
									</template>
								</td>
								
								<td align="right">
									{{listItem.ctn}}<small class="unit">CTN</small>
								</td>
								<td align="right">
									{{listItem.volume}}<small class="unit">CBM</small><br>
									{{listItem.salePackKgs}}<small class="unit">KGS</small>
								</td>
								<td>{{listItem.salePackArea_name}} </td>
								<td>
									<button class="btn btn-sm btn-default" data-toggle="popover" title="物流公司信息"  @mouseover="setpopper">
										物流派送
										<div class="content" style="display: none;">
											<div style="width:30vw">
												<template v-if="listItem.trans_id">
												<table class="table">
													<tbody>
														<tr>
															<td>公司名称</td>
															<td>{{listItem.trans_name}}</td>
														</tr>
														<tr v-for="(logistorLinkItem,logistorLinkIndex) in listItem.logistorLink">
															<td>{{logistorLinkItem.link_name}}</td>
															<td>{{logistorLinkItem.link_content}}</td>
														</tr>
														<tr v-for="(logistorAttrItem,logistorAttrIndex) in listItem.logistorAttr">
															<td>{{logistorAttrItem.attr_name}}</td>
															<td>{{logistorAttrItem.content}}</td>
														</tr>
													</tbody>
												</table>
												</template>
												<template v-else>
													未通知物流公司
												</template>
											</div>
										</div>
									</button>
								</td>
								<td>
									{{listItem.salePackCreate_name}}<br><small>{{listItem.salePackCreate_time}}</small>
								</td>
								<td>
									{{listItem.checker_name}}<br><small>{{listItem.checker_time}}</small>
								</td>
								<td align="right">
									<button class="btn btn-sm btn-default" data-toggle="modal" data-target="#logistor_viewModal" @click="checkView(listItem)">查看</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_callModal" @click="logistorNote(listItem,'view')" v-if="auth_ids.indexOf(341) != -1">通知</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_takeModal" v-if="(listItem.is_logistorPickup > 0) && auth_ids.indexOf(342) != -1" @click="logistorPickup(listItem,'view')" >取货</button>
									<a href="list2logistor_preview.html" class="btn btn-sm btn-default" @click="print()" v-if="auth_ids.indexOf(381) != -1">打印</a>
								</td>
							</tr>
							</template>
							<template v-else>
	                            <tr style="text-align: center;" >
	                                <td colspan="13" class="no_date" style="line-height: 20rem">{:lang('no_data')} </td>
	                            </tr>
	                        </template>
						</tbody>
					</table>
				</div>

				<!-- 已安排 -->
				<div class="col-md-12 tab-pane" id="delivery">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th width="4%"> 订单号 </th>
								<th width="4%"> 优先 </th>
								<th width="4%"> 时间 </th>
								<th width="20%"> 公司 </th>
								<th> 箱数 </th>
								<th> 体积/重量 </th>
								<th> 位置 </th>

								<th> 送货方式 </th>
								<th> 队员</th>

								<th> 装箱单 </th>
								<th> 对货员 </th>
								<th> 操作 </th>
							</tr>
						</thead>
						<tbody>
							<template v-if="list.length > 0">
							<tr v-for="(listItem,listIndex) in list">
								<td>{{formatUnit(listItem.id,'id')}}</td>
								<td align="center"><span class="label label-primary">{{listItem.priority}}</span></td>
								<td class="text-success main-list" :oldTime="listItem.create_at"><b></b></td>
								<td>{{listItem.company_name + (listItem.co_branch_name ? '('+listItem.co_branch_name+')' : '') }}</td>
								<td align="right">
									{{listItem.ctn}}<small class="unit">CTN</small>
								</td>
								<td align="right">
									{{listItem.volume}}<small class="unit">CBM</small><br>
									{{listItem.salePackKgs}}<small class="unit">KGS</small>
								</td>
								<td>{{listItem.salePackArea_name}}</td>

								<td>{{listItem.delivery_type_name}}</td>
								<td>
									<button class="btn btn-sm btn-default" data-toggle="popover" title="队员"  @mouseover="setpopper">
										队员
										<div class="content" style="display: none;">
											<div style="width:30vw">
												<span v-for="(teamsItem,teamsIndex) in listItem.teams"> 
												 	<template  v-if="teamsIndex == 0">
												 		{{teamsItem.nickname}} 
												 	</template>
												 	<template v-else>
												 		{{ ' / ' + teamsItem.nickname}} 
												 	</template>
												</span>
											</div>
										</div>
									</button>
								</td>

								<td>
									{{listItem.salePackCreate_name}}<br><small>{{listItem.salePackCreate_time}}</small>
								</td>
								<td>
									{{listItem.checker_name}}<br><small>{{listItem.checker_time}}</small>
								</td>
								<td align="right">
									<button class="btn btn-sm btn-default" data-toggle="modal" data-target="#logistor_viewModal" @click="checkView(listItem)">查看</button>
									<!--自取已完成-->
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_takeawayModal" v-if="listItem.delivery_type_id == 1 && auth_ids.indexOf(382) != -1" @click="selfFetchingOK(listItem,'view')" >已完成</button>

									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_delivery_receiveModal" v-if="listItem.delivery_type_id == 2 && auth_ids.indexOf(383) != -1" @click="thisAreaOK(listItem,'view')">已送货</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_delivery_receiveModal" v-if="listItem.delivery_type_id == 3 && auth_ids.indexOf(383) != -1" @click="thisCityOK(listItem,'view')">已送货</button>
									<button class="btn btn-sm btn-primary" data-toggle="modal" data-target="#logistor_call_receiveModal" v-if="listItem.delivery_type_id == 4 && auth_ids.indexOf(343) != -1" @click="logistorPickupOK(listItem,'view')">已取走</button>
								</td>
							</tr>
							</template>
							<template v-else>
	                            <tr style="text-align: center;" >
	                                <td colspan="13" class="no_date" style="line-height: 20rem">{:lang('no_data')} </td>
	                            </tr>
	                        </template>
						</tbody>
					</table>
				</div>

				<!-- 已完成 -->
				<div class="col-md-12 tab-pane" id="finish">
					<table class="table table-striped table-hover ntTable">
						<thead>
							<tr>
								<th width="4%"> 订单号 </th>
								<th width="4%"> 优先 </th>
								<th width="4%"> 时间 </th>
								<th width="20%"> 公司 </th>
								<th> 箱数 </th>
								<th> 体积/重量 </th>
								<th> 位置 </th>

								<th> 送货方式 </th>
								<th> 队员</th>

								<th> 装箱单 </th>
								<th> 对货员 </th>
								<th> 操作 </th>
							</tr>
						</thead>
						<tbody>
							<template v-if="list.length > 0">
							<tr v-for="(listItem,listIndex) in list">
								<td>{{formatUnit(listItem.id,'id')}}</td>
								<td align="center"><span class="label label-primary">{{listItem.priority}}</span></td>
								<td class="text-success main-list" :oldTime="listItem.package_at"><b></b></td>
								<td>{{listItem.company_name + (listItem.co_branch_name ? '('+listItem.co_branch_name+')' : '') }}</td>
								<td align="right">
									{{listItem.ctn}}<small class="unit">CTN</small>
								</td>
								<td align="right">
									{{listItem.volume}}<small class="unit">CBM</small><br>
									{{listItem.salePackKgs}}<small class="unit">KGS</small>
								</td>
								<td>{{listItem.salePackArea_name}}</td>

								<td>
									<template v-if="listItem.delivery_type_id != 4">
										{{listItem.delivery_type_name}} 
									</template>
									<template v-else>
										<button class="btn btn-sm btn-default" data-toggle="popover" title="物流公司信息"  @mouseover="setpopper">
											物流派送
											<div class="content" style="display: none;">
												<div style="width:30vw">
													<table class="table">
														<tbody>
															<tr>
																<td>公司名称</td>
																<td>{{listItem.trans_name}}</td>
															</tr>
															<tr v-for="(logistorLinkITem,logistorLinkIndex) in listItem.logistorLink">
																<td>{{logistorLinkITem.link_name}}</td>
																<td>{{logistorLinkITem.link_content}}</td>
															</tr>
															<tr v-for="(logistorLinkITem,logistorLinkIndex) in listItem.logistorAttr">
																<td>{{logistorLinkITem.attr_name}}</td>
																<td>{{logistorLinkITem.content}}</td>
															</tr>
															<!-- <tr>
																<td>coattr</td>
																<td>coattr=1,2,3,4,5</td>
															</tr> -->
														</tbody>
													</table>
												</div>
											</div>
										</button>
									</template>
								</td>
								<td>
									<button class="btn btn-sm btn-default" data-toggle="popover" title="队员"  @mouseover="setpopper">
										队员
										<div class="content" style="display: none;">
											<div style="width:30vw">
												<span v-for="(teamsItem,teamsIndex) in listItem.teams"> 
												 	<template  v-if="teamsIndex == 0">
												 		{{teamsItem.nickname}} 
												 	</template>
												 	<template v-else>
												 		{{ ' / ' + teamsItem.nickname}} 
												 	</template>
												</span>
											</div>
										</div>
									</button>
								</td>

								<td>
									{{listItem.salePackCreate_name}}<br><small>{{listItem.salePackCreate_time}}</small>
								</td>
								<td>
									{{listItem.checker_name}}<br><small>{{listItem.checker_time}}</small>
								</td>
								<td align="right">
									<button class="btn btn-sm btn-default" data-toggle="modal" data-target="#logistor_viewModal" @click="checkView(listItem)">查看</button>
								</td>
							</tr>
							</template>
							<template v-else>
	                            <tr style="text-align: center;" >
	                                <td colspan="13" class="no_date" style="line-height: 20rem">{:lang('no_data')} </td>
	                            </tr>
	                        </template>
						</tbody>
					</table>
				</div>

				<!--分页-->
				<div class="col-md-12">
					<ul class="pagination" id="pagination" v-show="list.length > 0"></ul>
				</div>
			</div>
		</div>
	</div>

	<!-- 配货-物流主管 查看 弹窗开始 -->
	<div class="modal fade" id="logistor_viewModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80%">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{formatUnit(checkViewData.id,'id')}}）送货查看</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <h4> 信息框 </h4>
								送货TAB里。根据送货类型送货内容和物流信息显示一个。
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-12">
							<ul class="nav nav-tabs">
								<li class="active"><a href="#view_delivery" data-toggle="tab">送货</a></li>
								<li><a href="#view_sale" data-toggle="tab">订单</a></li>
								<li><a href="#view_box" data-toggle="tab">装箱单</a></li>
							</ul>
						</div>
					</div>
					<div class="row tab-content" style="padding-top: 1rem">
						
						<!-- 送货 -->
						<div class="tab-pane active" id="view_delivery">
							<div class="col-md-3">
								<div class="panel panel-default">
									<table class="table">
										<tbody>
											<tr>
												<td width="30%">订单号</td>
												<td>{{formatUnit(checkViewData.id,'id')}}</td>
											</tr>
											<tr>
												<td>对货员</td>
												<td>{{checkViewData.checker_name}}</td>
											</tr>
											<tr>
												<td>装箱录入</td>
												<td>{{checkViewData.salePackCreate_name}} / {{checkViewData.salePackCreate_time}}</td>
											</tr>
											<tr>
												<td>装箱</td>
												<td align="right">
													{{checkViewData.ctn}}<small class="unit">CTN</small><br>
													{{checkViewData.volume}}<small class="unit">CBM</small><br>
													{{checkViewData.salePackKgs}}<small class="unit">KGS</small>
												</td>
											</tr>
											<!-- <tr>
												<td>装箱备注</td>
												<td></td>
											</tr> -->
											<tr>
												<td>发货区</td>
												<td>{{checkViewData.salePackArea_name}}</td>
											</tr>
											<tr>
												<td>送货方式</td>
												<td>{{checkViewData.delivery_type_name}}</td>
											</tr>
											<tr>
												<td>完成时间</td>
												<td>{{checkViewData.package_time}}</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<div class="col-md-9">
								<div class="panel panel-default"  v-if="checkViewData.delivery_type_id == 2 || checkViewData.delivery_type_id == 3"> 
									<div class="panel-heading">
										送货内容
									</div>
									<table class="table table-hover">
										<tbody>
											<tr>
												<td>公司</td>
												<td>BLUE ENTER COMERCIO E SOLUCOES TECNOLOGICAS EM INFORMATICA LTDA - ME</td>
											</tr>
											<tr>
												<td>送货地址</td>
												<td>R CAPITAO ANTONIO PEDRI, N - 8, SANTA FELICIDADE - CURITIBA - PR, CURITIBA, PARANÁ, BRASIL</td>
											</tr>
											<tr>
												<td>默认联系人</td>
												<td>FARNADO / 电话: 888-8888 8888 / 属性1: 属性1内容 </td>
											</tr>
											<tr>
												<td>送货队员</td>
												<td>FARNADO / TOMCRONS / HANKES / POSHORA </td>
											</tr>
											<tr>
												<td>回执</td>
												<td>FARNADO / 20-02-2020 11:22:33 </td>
											</tr>
											<tr>
												<td>更新</td>
												<td>WILLIAM / 20-02-2020 11:22:33 </td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="panel panel-default"  v-if="checkViewData.delivery_type_id == 4">
									<div class="panel-heading">
										物流信息
									</div>
									<table class="table table-hover">
										<tbody>
											<tr>
												<td>收货公司</td>
												<td>{{checkViewData.co_branch_id ? checkViewData.co_branch_name : checkViewData.company_name}}</td>
											</tr>
											<tr>
												<td>收货地址</td>
												<td>{{checkViewData.co_branch_id ? checkViewData.co_branch_info.addr : checkViewData.companyInfo.addr}}</td>
											</tr>
											<tr>
												<td>物流公司</td>
												<td>{{checkViewData.trans_name}}</td>
											</tr>
											<tr>
												<td>物流公司地址</td>
												<td>{{checkViewData.trans_id ? checkViewData.logistorCompany.addr : ''}}</td>
											</tr>
											<tr>
												<td>联系方式</td>
												<td>
													<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.link">
														{{logistorLinkItem.link_name + '：' + logistorLinkItem.link_content}}<br>
													</template>
												</td>
											</tr>
											<tr>
												<td>属性</td>
												<td>
													<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.attr">
														{{logistorLinkItem.attr_name + '：' + logistorLinkItem.content}}<br>
													</template>
												</td>
											</tr>
											<tr>
												<td>取货时间</td>
												<td>{{checkViewData.logistorPickuTime ? checkViewData.logistorPickuTime : '-'}}</td>
											</tr>
											<tr>
												<td>物流单号</td>
												<td>{{checkViewData.logistorPickuNo ? checkViewData.logistorPickuNo : '-'}}</td>
											</tr>
											<tr>
												<td>确认</td>
												<td>{{checkViewData.logistorCtreateTime}}</td>
											</tr>
											<tr>
												<td>更新</td>
												<td>{{checkViewData.logistorUpdateTime ? checkViewData.logistorUpdateTime : '-'}}</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
						
						<!-- 订单内容 -->
						<div class="tab-pane" id="view_sale">
							<div class="col-md-4">
								<div class="panel panel-default">
									<table class="table">
										<tbody>
											<tr>
												<td width="20%">订单号</td>
												<td>{{formatUnit(checkViewData.id,'id')}}</td>
											</tr>
											<tr>
												<td>公司</td>
												<td>{{checkViewData.company_name + (checkViewData.co_branch_name ? '('+checkViewData.co_branch_name+')':'')}}</td>
											</tr>
											<tr>
												<td>配单主管</td>
												<td>{{checkViewData.makeCreate_name}}</td>
											</tr>
											<tr>
												<td>对货员</td>
												<td>{{checkViewData.checker_name}}</td>
											</tr>
											<tr>
												<td>装箱员</td>
												<td>{{checkViewData.salePackCreate_name}}</td>
											</tr>
											<tr>
												<td>发票</td>
												<td>{{ checkViewData.invoiceDrawer_name ? checkViewData.invoiceDrawer_name + ' / ' + checkViewData.invoiceDrawer_name:'-'}}</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<div class="col-md-8">
								<div class="div-scroll" style="max-height:50vh">
									<div class="panel panel-default">
										<div class="panel-heading">
											订单内容
										</div>
										<table class="table table-hover">
											<thead>
												<tr>
													<th align="center">#</th>
													<th>产品</th>
													<th>箱规</th>
													<th>数量</th>
													<th>体积/重量</th>
													<th>取货位置</th>
												</tr>
											</thead>
											<tbody>
												<tr v-for="(sale_detailItem,sale_detailIndex) in checkViewData.sale_detail">
													<td align="center">{{sale_detailIndex+1}}</td>
													<td>
														<div class="pro">
															<div class="pro-icon"><img :src="sale_detailItem.proInfo.img_url" border="0" width="48px" height="48px" alt=""></div>
															<div class="pro-name">
																<small>{{ formatUnit(sale_detailItem.proInfo.prochar_id,'id') + (sale_detailItem.proInfo.brand_name ? ' / ' + sale_detailItem.proInfo : '') + (sale_detailItem.proInfo.model ? ' / ' + sale_detailItem.proInfo.model : '') }}</small><br>
																{{sale_detailItem.proInfo.pro_name}}
															</div>
														</div>
													</td>
													<td align="right">
														{{sale_detailItem.proInfo.prochar_qty}}<small class="unit">PCS/CTN</small><br>
														{{sale_detailItem.proInfo.ctn_size}}<small class="unit">CM</small>
													</td>
													<td align="right">
														{{sale_detailItem.qty}}<small class="unit">PCS</small>
													</td>
													<td align="right">
														{{ formatUnit(sale_detailItem.qty/sale_detailItem.proInfo.prochar_qty*sale_detailItem.proInfo.ctn_m3,'CBM')}}<small class="unit">CBM</small><br>
														{{ formatUnit(sale_detailItem.qty/sale_detailItem.proInfo.prochar_qty*sale_detailItem.proInfo.ctn_kgs,'KGS')}}<small class="unit">KGS</small>
													</td>
													<td>{{sale_detailItem.pickupArea_name}}</td>
												</tr>
											</tbody>
											<tfoot>
												<tr>
													<td colspan="6" align="right">
														合计体积： {{checkViewData.sum_m3}}<small class="unit">CBM</small> / 
														重量： {{checkViewData.sum_kgs}} <small class="unit">KGS</small>
													</td>
												</tr>
											</tfoot>
										</table>
									</div>
								</div>
							</div>
						</div>
						
						<div class="tab-pane" id="view_box">
							<!-- 装箱内容 -->
							<div class="col-md-12">
								<div class="div-scroll" style="max-height:50vh">
									<table class="table table-hover ntTable">
										<thead>
											<tr>
												<th>箱号</th>
												<th>产品</th>
												<th>数量</th>
												<th>箱规</th>
												<th>箱数</th>
												<th>体积/重量</th>
												<th>备注</th>
											</tr>
										</thead>
										<tbody>
											<template v-for="(sale_packItem,sale_packIndex) in checkViewData.sale_pack">
												<tr v-for="(packDetailItem,packDetailIndex) in sale_packItem.detail">
													<template v-if="packDetailIndex == 0">
														<td align="center">{{packDetailItem.pack_id}}</td>
													</template>
													<template v-else><td></td></template>

													<td>
														<div class="pro">
															<div class="pro-icon"><img :src="packDetailItem.proInfo.img_url" border="0" width="48px" height="48px" alt=""></div>
															<div class="pro-name">
																<small>{{ formatUnit(packDetailItem.proInfo.prochar_id,'id') + (packDetailItem.proInfo.brand_name ? ' / ' + packDetailItem.proInfo : '') + (packDetailItem.proInfo.model ? ' / ' + packDetailItem.proInfo.model : '') }}</small><br>
																{{packDetailItem.proInfo.pro_name}}
															</div>
														</div>
													</td>
													<td align="right">
														{{packDetailItem.qty}}<small class="unit">PCS</small>
													</td>
													<td align="right">
														{{packDetailItem.proInfo.ctn_size}}<small class="unit">CM</small><br>
														{{packDetailItem.proInfo.ctn_m3}}<small class="unit">CBM</small> / {{packDetailItem.proInfo.ctn_kgs}}<small class="unit">KGS</small>
													</td>
													<td align="right">{{packDetailItem.qty/packDetailItem.proInfo.prochar_qty}}<small class="unit">CTN</small></td>
													<td align="right">
														{{ formatUnit(packDetailItem.qty/packDetailItem.proInfo.prochar_qty*packDetailItem.proInfo.ctn_m3,'m3') }}<small class="unit">CBM</small><br>
														{{ formatUnit(packDetailItem.qty/packDetailItem.proInfo.prochar_qty*packDetailItem.proInfo.ctn_kgs,'CBM') }}<small class="unit">KGS</small>
													</td>
													<template v-if="packDetailIndex == 0">
														<td align="right">
															<button class="btn btn-sm btn-default" data-toggle="popover" title="备注内容" @mouseover="setpopper" v-if="sale_packItem.remark != undefined"  >
																备注
																<div class="content"  style="display: none;">
																	<div style="width:20vw">
																		<ul>
																			<li v-for="(remarkItem,remarkIndex) in sale_packItem.remark">{{remarkItem.remark}}</li>
																		</ul>
																	</div>
																</div>
															</button>
														</td>
													</template>
													<template v-else><td></td></template>
												</tr>
											</template>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					
					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>取消</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 自取 开始 弹窗开始 -->
	<div class="modal fade" id="logistor_takeModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80vw">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{formatUnit(logistorPickupData.id,'id')}}）取货完成</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
								<p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-9">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>{{formatUnit(logistorPickupData.id,'id')}}</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												{{logistorPickupData.company_name}}<br>
												<div class="label label-info text-1line" v-if="logistorPickupData.co_branch_name">分公司{{logistorPickupData.co_branch_name}}</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>{{logistorPickupData.co_branch_name ? logistorPickupData.co_branch_info.addr : logistorPickupData.companyInfo.addr}}</td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: {{logistorPickupData.ctn}}<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: {{logistorPickupData.volume}}<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: {{logistorPickupData.salePackKgs}}<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>位置</td>
											<td>{{logistorPickupData.salePackArea_name}}</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="col-md-3">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									指定协助
									<span class="pull-right">安排3个人</span>
								</div>
								<div class="div-scroll" style="max-height:50vh">
									<table class="table table-hover">
										<thead>
											<tr>
												<th width="15%">组员</th>
												<th>姓名</th>
											</tr>
										</thead>
										<tbody>
											<tr v-for="(deliverymanItem,deliverymanIndex) in deliveryman" v-if="deliverymanItem.position_id != 31">
												<td><input type="checkbox" :value="deliverymanItem.admin_id" v-model="deliveryman_ids"></td>
												<td>
													{{deliverymanItem.nickname}} 
													<span class="label label-info pull-right" v-if="deliverymanItem.position_id == 37">L</span>
													<span class="label label-default pull-right" v-if="deliverymanItem.position_id == 39">P</span>
													<span class="label label-info pull-right" v-if="deliverymanItem.position_id == 31">M</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="selfLogistorPickup('','save')" v-if="requestType == 'self_fetching'"  :disabled="isdisabled">
						<span class="fa fa-dolly"></span>自取货开始
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="logistorPickup('','save')" v-else :disabled="isdisabled">
						<span class="fa fa-dolly"></span>物流取货开始
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 送货人员 设置 弹窗开始 -->
	<div class="modal fade" id="deliveryman_editModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:50vw">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">送货人员值勤</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                           	<p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-12">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									<span>送货员工</span>
								</div>
								<div class="div-scroll" style="max-height:50vh">
									<table class="table table-hover">
										<thead>
											<tr>
												<th class="text-center">#</th>
												<th></th>
												<th>姓名</th>
												<th>状态</th>
												<th>操作</th>
											</tr>
										</thead>
										<tbody>

											<tr v-for="(deliverymanItem,deliverymanIndex) in deliveryman">
												<td align="center">{{deliverymanIndex+1}}</td>
												<td>
													<span class="label label-info" v-if="deliverymanItem.position_id == 37">L</span>
													<span class="label label-default" v-if="deliverymanItem.position_id == 39">P</span>
													<span class="label label-info" v-if="deliverymanItem.position_id == 31">M</span>
												</td>
												<td>
													{{deliverymanItem.nickname}} 
												</td>
												<td>
													<span class="label label-info" v-if="deliverymanItem.status == 1">工作中: {{deliverymanItem.work_time}}</span>
													<span class="label label-default" v-if="deliverymanItem.status == 2">请假: {{deliverymanItem.leave_time}}</span>
													<span class="label label-default" v-if="deliverymanItem.status == 3">离岗: {{deliverymanItem.workout_time}}</span>
												</td>
												<td align="right">
													<template v-if="deliverymanItem.status != 1">
														<button class="btn btn-sm btn-primary" v-if="deliverymanItem.status != 3 && auth_ids.indexOf(336) != -1" @click="deliverymanWorkout(deliverymanItem.id,deliverymanItem.nickname)">离岗</button>
														<button class="btn btn-sm btn-primary" v-if="deliverymanItem.status != 2 && auth_ids.indexOf(337) != -1" @click="deliverymanLeave(deliverymanItem.id,deliverymanItem.nickname)">请假</button>	
													</template>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
					
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 送货安排 弹窗开始 -->
	<div class="modal fade" id="logistor_deliveryModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80vw">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">送货安排</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-9">
							<div class="div-scroll" style="height:60vh">
								<template v-for="(thisAreaDeliveryDataItem,thisAreaDeliveryDataIndex) in thisAreaDeliveryData">
									<div class="panel panel-default">
										<div class="panel-body">
											<div class="row">
												<div class="col-md-1">
													<span class="label label-default f-1">{{ formatUnit(thisAreaDeliveryDataItem.id,'id') }}</span>
													<span class="label label-info" v-if="thisAreaDeliveryData.delivery_note_id">{{formatUnit(thisAreaDeliveryDataItem.delivery_note_id,'id')}}</span>
												</div>
												<div class="col-md-9">
													<div class="f-1 text-1line">{{thisAreaDeliveryDataItem.company_name}}</div>
													<div class="label label-info text-1line" v-if="thisAreaDeliveryDataItem.co_branch_name">{{thisAreaDeliveryDataItem.co_branch_name}}</div><br>
													<!-- sale.co_id公司地址：分公司存在 则用分公司地址 -->
													<template v-if="thisAreaDeliveryDataItem.co_branch_name">
														{{thisAreaDeliveryDataItem.co_branch_info.addr}}
													</template>
													<template v-else>
														{{thisAreaDeliveryDataItem.companyInfo.addr}}
													</template>
													
												</div>
												<div class="col-md-2 text-right">
													{{thisAreaDeliveryDataItem.ctn}}<small class="unit">CTN</small><br>
													{{thisAreaDeliveryDataItem.volume}}<small class="unit">CBM</small><br>
													{{thisAreaDeliveryDataItem.salePackKgs}}<small class="unit">KGS</small>
												</div>
											</div>
										</div>
									</div>	
								</template>
								
							</div>
						</div>
						<div class="col-md-3">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									<span>指定送货人</span>
									<span class="pull-right">安排3个人</span>
								</div>
								<div class="div-scroll" style="max-height:50vh">
									<table class="table table-hover">
										<thead>
											<tr>
												<th width="15%">组员</th>
												<th>姓名</th>
											</tr>
										</thead>
										<tbody>
											<tr v-for="(deliverymanItem,deliverymanIndex) in deliveryman">
												<td><input type="checkbox" :value="deliverymanItem.admin_id" v-model="deliveryman_ids"></td>
												<td>
													{{deliverymanItem.nickname}} 
													<span class="label label-info pull-right" v-if="deliverymanItem.position_id == 37">L</span>
													<span class="label label-default pull-right" v-if="deliverymanItem.position_id == 39">P</span>
													<span class="label label-info pull-right" v-if="deliverymanItem.position_id == 31">M</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
							<div class="panel panel-warning" style="margin-bottom: 0.5rem">
								<div class="panel-body bg-warning">
									<div class="row text-right">
										<div class="col-md-4">
											<small class="gray">箱数</small><br>
											{{thisAreaDeliveryDataFooter.ctn}}<small class="unit">CTN</small>
										</div>
										<div class="col-md-4">
											<small class="gray">体积</small><br>
											{{thisAreaDeliveryDataFooter.m3}}<small class="unit">CBM</small>
										</div>
										<div class="col-md-4">
											<small class="gray">重量</small><br>
											{{thisAreaDeliveryDataFooter.kgs}}<small class="unit">KGS</small>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="thisAreaDelivery('','save')" v-if="!batchSave"  :disabled="isdisabled">
						<span class="fa fa-dolly"></span>按排送货
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="batchDelivery('save')" v-if="batchSave"  :disabled="isdisabled">
						<span class="fa fa-dolly"></span>按排送货
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 物流安排--通知 弹窗开始 -->
	<div class="modal fade" id="logistor_callModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:60vw">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{ formatUnit(logistorNoteData.id,'id') }}）物流安排</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-12">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>{{ formatUnit(logistorNoteData.id,'id') }}</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												{{ logistorNoteData.company_name }}<br>
												<div class="label label-info text-1line" v-if="logistorNoteData.co_branch_id">分公司{{ logistorNoteData.co_branch_name }}</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>{{ logistorNoteData.co_branch_id ? logistorNoteData.co_branch_info.addr : logistorNoteData.companyInfo.addr }}</td>
										</tr>
										<tr>
											<td>指定物流</td>
											<td>
												<select name="" id="" class="form-control" v-model="logistorCompany_id" @change="selectlogistorCompany()"> 
													<option value="0">请选择物流公司</option>
													<option :value="logistorCompanyItem.id" v-for="(logistorCompanyItem,logistorCompanyIndex) in logistorCompany">{{logistorCompanyItem.name}}</option>
												</select>
											</td>
										</tr>
										<tr>
											<td>联系物流</td>
											<td>
												<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.link">
													{{logistorLinkItem.link_name + '：' + logistorLinkItem.link_content}}<br>
												</template>
												<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.attr">
													{{logistorLinkItem.attr_name + '：' + logistorLinkItem.content}}<br>
												</template>
											</td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: {{logistorNoteData.ctn}}<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: {{logistorNoteData.volume}}<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: {{logistorNoteData.salePackKgs}}<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>位置</td>
											<td>{{logistorNoteData.salePackArea_name}}</td>
										</tr>
										<tr>
											<td>通知备注</td>
											<td>
												<textarea class="form-control" rows="3" id="remark">{{logistorNoteData.logistorRemark}}</textarea>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>

					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="logistorNote('','save')"  :disabled="isdisabled">
						<span class="fa fa-phone fa-flip-horizontal"></span>已通知物流
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 物流取货 弹窗开始 -->
	<div class="modal fade" id="logistor_tackModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:60vw">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（8888）物流取货</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <h4> 信息框 </h4>
								如果订单没有指定物流公司。这里可以选择一个物流公司。如果有就固定不能选择<br>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-12">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>8888</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												BRANDSOFT-COM DE COMPONENTES PARA INFORMATICA LTDA - ME<br>
												<div class="label label-info text-1line">分公司BRANDSOFT-COM DE COMPONENTES PARA INFORMATICA LTDA - ME</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>R CAPITAO ANTONIO PEDRI, N - 8, SANTA FELICIDADE - CURITIBA - PR, CURITIBA, PARANÁ, BRASIL</td>
										</tr>
										<tr>
											<td>指定物流</td>
											<td>
												<select name="" id="" class="form-control">
													<option value="">请选择物流公司</option>
													<option value="">物流公司列表</option>
												</select>
											</td>
										</tr>
										<tr>
											<td>通知备注</td>
											<td>
												<input type="text" class="form-control">
											</td>
										</tr>
										<tr>
											<td>联系物流</td>
											<td>电话: 888-8888 8888 / 属性1:属性1.value / 属性2:属性2.value </td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: 75<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: 25.55<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: 166.66<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>位置</td>
											<td>一层中转B区</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>

					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" data-dismiss="modal" style="padding-left:24px;padding-right:24px">
						<span class="fa fa-dolly"></span>物流取货确认
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 自取 完成 弹窗开始 -->
	<div class="modal fade" id="logistor_takeawayModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80%">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{formatUnit(selfFetchingOKData.id,'id')}}）自取完成</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-9">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>{{ formatUnit(selfFetchingOKData.id,'id') }}</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												{{selfFetchingOKData.company_name}}<br>
												<div class="label label-info text-1line" v-if="selfFetchingOKData.co_branch_name">分公司{{selfFetchingOKData.co_branch_name}}</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>{{selfFetchingOKData.co_branch_name ? selfFetchingOKData.co_branch_info.addr : selfFetchingOKData.companyInfo.addr}}</td>
										</tr>
										<tr>
											<td><div class="lh-3">回执<span class="required"></span></div></td>
											<td>
												<div class="col-md-6">
													<select name="" id="receipt_id" class="form-control" >
														<option value="0">请选择递交回执人员</option>
														<option :value="teamsItem.id" v-for="(teamsItem,teamsIndex) in selfFetchingOKData.teams">{{teamsItem.nickname}}</option>
													</select>
												</div>
												<div class="col-md-6">
													<button class="btn btn-sm btn-default btn-checkbox">
														<input type="checkbox" value="1" name="receipt"> 确认收到回执
													</button>
												</div>
											</td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: {{selfFetchingOKData.ctn}}<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: {{selfFetchingOKData.volume}}<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: {{selfFetchingOKData.salePackKgs}}<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>出发时间</td>
											<td>{{selfFetchingOKData.make_delivery_start_time}}</td>
										</tr>
										<tr>
											<td>用时</td>
											<td><span class="green">{{selfFetchingOKData.user_time}}</span></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="col-md-3">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									<span>队员</span>
								</div>
								<div class="panel-body">
									<table class="table">
										<tbody>
											<tr v-for="(teamsItem,teamsIndex) in selfFetchingOKData.teams">
												<td>{{teamsItem.nickname}}
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 37">L</span>
													<span class="label label-default pull-right" v-if="teamsItem.position_id == 39">P</span>
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 31">M</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="selfFetchingOK('','save')">
						<span class="fa fa-dolly"></span>送货完成
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 送货安排 完成 弹窗开始 -->
	<div class="modal fade" id="logistor_delivery_receiveModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80%">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{ formatUnit(thisAreaAndCityOKData.id,'id') }}）送货完成</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-9">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>{{ formatUnit(thisAreaAndCityOKData.id,'id') }}</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												{{thisAreaAndCityOKData.company_name}}<br>
												<div class="label label-info text-1line" v-if="thisAreaAndCityOKData.co_branch_name">分公司{{thisAreaAndCityOKData.co_branch_name}}</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>{{thisAreaAndCityOKData.co_branch_name ? thisAreaAndCityOKData.co_branch_info.addr : thisAreaAndCityOKData.companyInfo.addr}}</td>
										</tr>
										<tr>
											<td><div class="lh-3">回执<span class="required"></span></div></td>
											<td>
												<div class="col-md-6">
													<select name="" id="receipt_id" class="form-control" >
														<option value="0">请选择递交回执人员</option>
														<option :value="teamsItem.id" v-for="(teamsItem,teamsIndex) in thisAreaAndCityOKData.teams">{{teamsItem.nickname}}</option>
													</select>
												</div>
												<div class="col-md-6">
													<button class="btn btn-sm btn-default btn-checkbox">
														<input type="checkbox" value="1" name="receipt"> 确认收到回执
													</button>
												</div>
											</td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: {{thisAreaAndCityOKData.ctn}}<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: {{thisAreaAndCityOKData.volume}}<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: {{thisAreaAndCityOKData.salePackKgs}}<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>出发时间</td>
											<td>{{thisAreaAndCityOKData.make_delivery_start_time}}</td>
										</tr>
										<tr>
											<td>用时</td>
											<td><span class="green">{{thisAreaAndCityOKData.user_time}}</span></td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="col-md-3">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									<span>队员</span>
								</div>
								<div class="panel-body">
									<table class="table">
										<tbody>
											<tr v-for="(teamsItem,teamsIndex) in thisAreaAndCityOKData.teams">
												<td>{{teamsItem.nickname}}
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 37">L</span>
													<span class="label label-default pull-right" v-if="teamsItem.position_id == 39">P</span>
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 31">M</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary"style="padding-left:24px;padding-right:24px" @click="thisAreaOK('','save')" v-if="areaOrcity == 'area'">
						<span class="fa fa-dolly"></span>送货完成
					</button>
					<button type="button" class="btn btn-primary"style="padding-left:24px;padding-right:24px" @click="thisCityOK('','save')" v-if="areaOrcity == 'city'">
						<span class="fa fa-dolly"></span>送货完成
					</button>
	            </div>
	        </div>
	    </div>
	</div>

	<!-- 配货-物流主管 物流安排 完成 弹窗开始 -->
	<div class="modal fade" id="logistor_call_receiveModal" tabindex="-1" role="dialog" aria-hidden="true">
	    <div class="modal-dialog modal-lg" style="width:80%">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	                <h4 class="modal-title">订单（{{ formatUnit(logistorPickupData.id,'id') }}）物流取货完成</h4>
	            </div>
	            <div class="modal-body">
	                <div class="row">
	                    <div class="col-md-12">
	                        <div class="alert alert-dismissable alert-info">
	                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	                            <p></p>
	                        </div>
	                    </div>
	                </div>
					<div class="row">
						<div class="col-md-9">
							<div class="panel panel-default">
								<div class="panel-heading">订单内容</div>
								<table class="table table-hover">
									<tbody>
										<tr>
											<td>订单号</td>
											<td>{{ formatUnit(logistorPickupData.id,'id') }}</td>
										</tr>
										<tr>
											<td>公司</td>
											<td>
												{{logistorPickupData.company_name}}<br>
												<div class="label label-info text-1line" v-if="logistorPickupData.co_branch_name">分公司{{logistorPickupData.co_branch_name}}</div>
											</td>
										</tr>
										<tr>
											<td>地址</td>
											<td>{{logistorPickupData.co_branch_name ? logistorPickupData.co_branch_info.addr : logistorPickupData.companyInfo.addr}}</td>
										</tr>
										<tr>
											<td>指定物流</td>
											<td>{{logistorPickupData.trans_name}}</td>
										</tr>
										<tr>
											<td>联系方式</td>
											<td>
												<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.link">
													{{logistorLinkItem.link_name + '：' + logistorLinkItem.link_content}}<br>
												</template>
												<template v-for="(logistorLinkItem,logistorLinkIndex) in logistorLinkAndAttr.attr">
													{{logistorLinkItem.attr_name + '：' + logistorLinkItem.content}}<br>
												</template>
											</td>
										</tr>
										<tr>
											<td><div class="lh-3">物流单号<span class="required"></span></div></td>
											<td><input type="text" class="form-control" id="logistorNo"></td>
										</tr>
										<tr>
											<td>合计</td>
											<td>
												<div class="col-md-2">箱数: {{logistorPickupData.ctn}}<small class="unit">CTN</small></div>
												<div class="col-md-2">体积: {{logistorPickupData.volume}}<small class="unit">CBM</small></div>
												<div class="col-md-2">重量: {{logistorPickupData.salePackKgs}}<small class="unit">KGS</small></div>
											</td>
										</tr>
										<tr>
											<td>位置</td>
											<td>{{logistorPickupData.salePackArea_name}}</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<div class="col-md-3">
							<div class="panel panel-default" style="margin-bottom: 0.5rem">
								<div class="panel-heading">
									<span>队员</span>
								</div>
								<div class="panel-body">
									<table class="table">
										<tbody>
											<tr v-for="(teamsItem,teamsIndex) in logistorPickupData.teams">
												<td>{{teamsItem.nickname}}
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 37">L</span>
													<span class="label label-default pull-right" v-if="teamsItem.position_id == 39">P</span>
													<span class="label label-info pull-right" v-if="teamsItem.position_id == 31">M</span>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
	            <div class="modal-footer">
	                <button type="button" class="btn btn-default" data-dismiss="modal">
						<span class="glyphicon glyphicon-remove"></span>取消
					</button>
					<button type="button" class="btn btn-primary" style="padding-left:24px;padding-right:24px" @click="logistorPickupOK('','save')" :disabled="isdisabled">
						<span class="fa fa-dolly"></span>物流取货完成
					</button>
	            </div>
	        </div>
	    </div>
	</div>


</div>

<script type="text/javascript">
  	setInterval(function() {
  		var data = $('.main-list');
        $.each(data, (key, value) => {
        	var time = Date.parse(new Date())/1000 - $('.main-list').eq(key).attr('oldTime');
        	var s = 0	// 秒
        	var m = 0	// 分
        	var h = 0	// 时
        	if(time > 59 ){
        		s = time%60;	// 取余
        		if(s < 10) s= '0'+ s
        		m = Math.floor(time/60)
        		if(m >= 60 ) m = (m%60)
        		if(m < 10) m= '0'+ m
        		h = Math.floor(time/3600)
        		if(h < 10) h= '0'+ h
        	}
        	// console.log(h+':'+m+":"+s)
        	$('.main-list').eq(key).text( h+':'+m+":"+s );
        })
  	}, 1000);
</script>
<script src="/static/Admin/js/salelogistor.js"></script>
<!--弹窗部分 结束-->
{include file="public/foot"/}